package com.hakim.wfb.customer.service.convert;

import com.hakim.wfb.bean.ConsumeRecord;
import com.hakim.wfb.customer.result.trans.ConsumeRecordView;

/**
 * Created by Administrator on 2017/7/7.
 */
public class ConsumeRecordDtv {

    public static ConsumeRecordView convert(ConsumeRecord obj) {

        ConsumeRecordView view = new ConsumeRecordView();
        view.setTid(obj.getTid());
        view.setCrOrderno(obj.getCrOrderno());
        view.setCrUser(obj.getCrUser());
        view.setCrCustPoint(obj.getCrCustPoint());
        view.setCrInvestTime(obj.getCrInvestTime());
        view.setCrRewardTime(obj.getCrRewardTime());
        view.setCrRewardSum(obj.getCrRewardSum());
        view.setCrCustRule(obj.getCrCustRule());
        view.setCrPointType(obj.getCrPointType());
        if ("1".equals(obj.getCrCustRule()))
            view.setCrCustRuleDesc("10日");
        else
            view.setCrCustRuleDesc("30日");
        view.setCrRewardRemainCount(obj.getCrRewardRemainCount());

        return view;
    }
}
